﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ContactEdit.aspx.cs" Inherits="Business_Cisoft3G_ContactsManage_ContactEdit" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>修改联系人</title>
    <link href="../../../css/style.css" rel="stylesheet" type="text/css" />
    <link href="../../../css/font.css" rel="stylesheet" type="text/css" />
    <link href="../../../css/style_ts.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="../../../js/jquery-1.4.2.min.js"></script>
    <style type="text/css">
        .modalBackground
        {
            background-color: Gray;
            filter: alpha(opacity=70);
            opacity: 0.7;
        }
    </style>
    
    <script type="text/javascript">
        $(document).ready(function() {
            $('#txtMobile').blur(function() {
                if ($.trim($(this).val()) == '') {
                    $('#span_checkMobile').html("请输入手机号码");
                    return false;
                }
                var reg = /^15[0-9]{1}\d{8}|13\d{9}|18[6789]{1}\d{8}$/;
                if (reg.test($(this).val())) {
                    $('#span_checkMobile').html("");
                    return true;
                }
                else {
                    $('#span_checkMobile').html("该号码不是有效的手机号码");
                    return false;
                }
            });
        });
    </script>
    
     <script type="text/javascript">
         function checkMobile() {
             var result = false;
             if ($.trim($('#txtMobile').val()) == '') {
                 $('#span_checkMobile').html("请输入手机号码");
                 result = false;
                 return result;
             } else $('#span_checkMobile').html("");
             var reg = /^15[0-9]{1}\d{8}|13\d{9}|18[6789]{1}\d{8}$/;
             if (reg.test($('#txtMobile').val())) {
                 $('#span_checkMobile').html("");
                 result = true;
             }
             else {
                 $('#span_checkMobile').html("该号码不是有效的手机号码");
                 result = false;
                 //return result;
             }
             return result;
         }
     
         function checkForm() {
             var result = false;
             if (Page_ClientValidate()) {
                 result = checkMobile();
             }
             return result;
         }
     </script>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="Scriptmanager1" runat="server" EnableScriptGlobalization="true"
        EnableScriptLocalization="true">
    </asp:ScriptManager>
    <!--第一行-->
    <div class="position_list">
        <div class="position_left_list">
        </div>
        <div class="position_con_list">
            <table border="0" cellpadding="0" cellspacing="0">
                <tr>
                    <td width="30">
                        <img src="../../../Images/3G/icon21.gif" width="14" height="14" alt="" />
                    </td>
                    <td class="cyan12">
                        修改联系人信息
                    </td>
                </tr>
            </table>
        </div>
        <div class="position_right_list">
        </div>
    </div>
    <!--系统温馨提示栏-->
    <div class="search_list">
        <div class="search_top_list">
            <div class="search_topleft_list">
            </div>
            <!--  查询     -->
            <div class="search_topbg_list">
                <table border="0" cellpadding="0" cellspacing="0">
                    <tr>
                        <td width="30" align="left" valign="middle" style="padding-top: 4px;">
                            <img src="../../../Images/3G/icon_logo.gif" width="22" height="22" />
                        </td>
                        <td width="100" class="cyan13_bold" style="padding-top: 5px;">
                            系统温馨提示栏
                        </td>
                        <td style="padding-top: 5px;">
                            &nbsp;&nbsp;&nbsp;
                        </td>
                    </tr>
                </table>
            </div>
            <div class="search_topright_list">
            </div>
        </div>
    </div>
    <!--   查询条件    -->
    <div class="index_search_con_list">
        <!--数据列表-->
        <table width="100%" border="0" cellspacing="" cellpadding="0" bgcolor="73798f"
            id="table1" class="white12_normal" style="padding-left: 10px;">
            <tr  bgcolor="#1E3541">
                <td width="120" height="30" valign="middle" style="text-align: right">
                    <span style="color:Red">* </span>姓名：
                </td>
                <td width="300" height="30" valign="middle" style="text-align: left; padding-left: 10px;">
                    <asp:TextBox ID="txtName" runat="server" Style="border: 1px solid #ffffff; width: 100%"
                        MaxLength="4"></asp:TextBox>
                </td>
                <td valign="middle" style="text-align: left;" class="cyan12">
                    &nbsp;&nbsp;&nbsp;&nbsp;(必填)请输入联系人姓名
                    <br /> &nbsp;&nbsp;&nbsp;&nbsp;
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtName"
                        ErrorMessage="请输入姓名" Display="Dynamic"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr  bgcolor="#1E3541">
                <td  height="30" valign="middle" style="text-align: right">
                    <span style="color:Red">* </span>手机：
                </td>
                <td width="300" height="30" valign="middle" style="text-align: left; padding-left: 10px;">
                    <asp:TextBox ID="txtMobile" runat="server" Style="border: 1px solid #ffffff; width: 100%"
                        MaxLength="11"></asp:TextBox>
                </td>
                <td valign="middle" style="text-align: left" class="cyan12">
                    &nbsp;&nbsp;&nbsp;&nbsp;(必填)请输入联系人11位的手机号码<br /> &nbsp;&nbsp;&nbsp;&nbsp;
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtMobile"
                        ErrorMessage="请输入手机号码" Display="Dynamic"></asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" Display="Dynamic"
                        ControlToValidate="txtMobile" ErrorMessage="请输入正确的手机号码！" ValidationExpression="^^15[0-9]{1}\d{8}|13\d{9}|18[6789]{1}\d{8}$"></asp:RegularExpressionValidator>
                    <asp:Label ID="lblMobileRepead" runat="server" Text=""></asp:Label>
                </td>
            </tr>
            <tr  bgcolor="#1E3541">
                <td  height="30" valign="middle" style="text-align: right">
                    电话：
                </td>
                <td width="300" height="30" valign="middle" style="text-align: left; padding-left: 10px;">
                    <asp:TextBox ID="txtPhone" runat="server" Style="border: 1px solid #ffffff; width: 100%"
                        MaxLength="12"></asp:TextBox>
                </td>
                <td valign="middle" style="text-align: left" class="cyan12">
                    &nbsp;&nbsp;&nbsp;&nbsp;请输入联系人电话号码，格式为区号-号码 如：0771-3830355<br /> &nbsp;&nbsp;&nbsp;&nbsp;
                    <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" Display="Dynamic"
                        ControlToValidate="txtPhone" ErrorMessage="请输入正确的电话号码！" ValidationExpression="(\(\d{3,4}\)|\d{3,4}-)?\d{7,8}"></asp:RegularExpressionValidator>
                </td>
            </tr>
            
            <tr  bgcolor="#1E3541">
                <td  height="30" valign="middle" style="text-align: right">
                    电子邮箱：
                </td>
                <td width="300" height="30" valign="middle" style="text-align: left; padding-left: 10px;">
                    <asp:TextBox ID="txtEmail" runat="server" Style="border: 1px solid #ffffff; width: 100%"
                        MaxLength="50"></asp:TextBox>
                </td>
                <td valign="middle" style="text-align: left" class="cyan12">
                    &nbsp;&nbsp;&nbsp;&nbsp;请输入联系人常用的电子邮箱地址<br /> &nbsp;&nbsp;&nbsp;&nbsp;
                    <asp:RegularExpressionValidator ID="RegularExpressionValidator4" runat="server" Display="Dynamic"
                        ControlToValidate="txtEmail" ErrorMessage="请输入正确的电子邮箱！" ValidationExpression="^[\w-]+(\.[\w-]+)*@[\w-]+(\.[\w-]+)+$"></asp:RegularExpressionValidator>
                </td>
            </tr>
            <tr  bgcolor="#1E3541">
                <td  height="30" valign="middle" style="text-align: right">
                    QQ号码：
                </td>
                <td width="300" height="30" valign="middle" style="text-align: left; padding-left: 10px;">
                    <asp:TextBox ID="txtQQ" runat="server" Style="border: 1px solid #ffffff; width: 100%"
                        MaxLength="11"></asp:TextBox>
                </td>
                <td valign="middle" style="text-align: left" class="cyan12">
                    &nbsp;&nbsp;&nbsp;&nbsp;请输入联系人的常用QQ号码<br /> &nbsp;&nbsp;&nbsp;&nbsp;
                    <asp:RegularExpressionValidator ID="RegularExpressionValidator3" runat="server" Display="Dynamic"
                        ControlToValidate="txtQQ" ErrorMessage="请输入正确的QQ号码！" ValidationExpression="^\d{5,11}$"></asp:RegularExpressionValidator>
                </td>
            </tr>
            <tr  bgcolor="#1E3541">
                <td  height="30" valign="middle" style="text-align: right">
                    地址：
                </td>
                <td width="300" height="30" valign="middle" style="text-align: left; padding-left: 10px;">
                    <asp:TextBox ID="txtAddress" runat="server" Style="border: 1px solid #ffffff; width: 100%"
                        MaxLength="50"></asp:TextBox>
                </td>
                <td valign="middle" style="text-align: left" class="cyan12">
                    &nbsp;&nbsp;&nbsp;&nbsp;请输入联系人地址
                </td>
            </tr>
            <tr  bgcolor="#1E3541">
                <td  height="30" valign="middle" style="text-align: right">
                    邮政编码：
                </td>
                <td width="300" height="30" valign="middle" style="text-align: left; padding-left: 10px;">
                    <asp:TextBox ID="txtPostCode" runat="server" Style="border: 1px solid #ffffff; width: 100%"
                        MaxLength="6"></asp:TextBox>
                </td>
                <td valign="middle" style="text-align: left" class="cyan12">
                    &nbsp;&nbsp;&nbsp;&nbsp;请输入6位数字的邮政编码<br /> &nbsp;&nbsp;&nbsp;&nbsp;
                    <asp:RegularExpressionValidator ID="RegularExpressionValidator5" runat="server" Display="Dynamic"
                        ControlToValidate="txtPostCode" ErrorMessage="请输入正确的邮政编码！" ValidationExpression="\d{6}"></asp:RegularExpressionValidator>
                </td>
            </tr>
            <tr  bgcolor="#1E3541">
                <td  height="30" valign="middle" style="text-align: right">
                    单位：
                </td>
                <td width="300" height="30" valign="middle" style="text-align: left; padding-left: 10px;">
                    <asp:TextBox ID="txtCompany" runat="server" Style="border: 1px solid #ffffff; width: 100%"
                        MaxLength="30"></asp:TextBox>
                </td>
                <td valign="middle" style="text-align: left" class="cyan12">
                    &nbsp;&nbsp;&nbsp;&nbsp;请输入联系人所在单位的全称
                </td>
            </tr>
            <tr  bgcolor="#1E3541">
                <td  height="30" valign="middle" style="text-align: right">
                    单位地址：
                </td>
                <td width="300" height="30" valign="middle" style="text-align: left; padding-left: 10px;">
                    <asp:TextBox ID="txtCompanyAddress" runat="server" Style="border: 1px solid #ffffff;
                        width: 100%" MaxLength="50"></asp:TextBox>
                </td>
                <td valign="middle" style="text-align: left" class="cyan12">
                    &nbsp;&nbsp;&nbsp;&nbsp;请输入联系人所在单位的地址
                </td>
            </tr>
            <tr  bgcolor="#1E3541">
                <td  height="30" valign="middle" style="text-align: right">
                    部门：
                </td>
                <td width="300" height="30" valign="middle" style="text-align: left; padding-left: 10px;">
                    <asp:TextBox ID="txtDepartment" runat="server" Style="border: 1px solid #ffffff;
                        width: 100%" MaxLength="15"></asp:TextBox>
                </td>
                <td valign="middle" style="text-align: left" class="cyan12">
                    &nbsp;&nbsp;&nbsp;&nbsp;请输入联系人所在部门
                </td>
            </tr>
            <tr  bgcolor="#1E3541">
                <td  height="30" valign="middle" style="text-align: right">
                    职务：
                </td>
                <td width="300" height="30" valign="middle" style="text-align: left; padding-left: 10px;">
                    <asp:TextBox ID="txtDuty" runat="server" Style="border: 1px solid #ffffff; width: 100%"
                        MaxLength="10"></asp:TextBox>
                </td>
                <td valign="middle" style="text-align: left" class="cyan12">
                    &nbsp;&nbsp;&nbsp;&nbsp;请输入联系人职务
                </td>
            </tr>
            <tr  bgcolor="#1E3541">
                <td  height="30" valign="middle" style="text-align: right;">
                    隶属通讯录组：
                </td>
                <td width="300" height="30" valign="middle" style="text-align: left; padding-left: 10px;">
                    <asp:DropDownList ID="ddlContactGroup" runat="server">
                    </asp:DropDownList>
                </td>
                <td valign="middle" style="text-align: left" class="cyan12">
                    &nbsp;&nbsp;&nbsp;&nbsp;请选择联系人分组
                </td>
            </tr>
            <tr bgcolor="#1E3541">
                <td height="30" valign="middle" style="text-align: right;">
                </td>
                <td width="300" height="30" valign="middle" style="text-align: left; padding-left: 10px;">
                    <asp:Button ID="btnUpdate" runat="server" Text="" ToolTip="修改" OnClick="btnEidt_Click" />
                    <asp:Button ID="btnBack" runat="server" Text="" ToolTip="返回" OnClick="btnBack_Click"
                        CausesValidation="false" />
                </td>
                <td valign="middle" style="text-align: left" class="cyan12">
                </td>
                
            </tr>
           
        </table>
    </div>

    <!---底部-->
    <div class="search_bottom_list">
        <div class="search_bottomleft_list">
        </div>
        <div class="search_bottombg_list">
        </div>
        <div class="search_bottomright_list">
        </div>
    </div>
    
    
    <ajaxToolkit:ModalPopupExtender ID="ModalPopupExtender2" runat="server" TargetControlID="LinkButton1"
        PopupControlID="Panel1" BackgroundCssClass="modalBackground" OnOkScript="onOk()"
        DropShadow="true" PopupDragHandleControlID="Panel2" CancelControlID="btnCloseAll2">
    </ajaxToolkit:ModalPopupExtender>
    <asp:Panel ID="Panel1" runat="server" Style="display: none; width: 450px; vertical-align: middle;">
        <div class="attention">
            <asp:Panel ID="Panel2" runat="server" Style="vertical-align: middle;">
                <div class="attention_top">
                    <div class="attention_topleft">
                    </div>
                    <div class="attention_topmid">
                        <table width="98%" border="0" cellpadding="0" cellspacing="0">
                            <tr>
                                <td align="left" valign="middle" class="title">
                                    提示信息
                                </td>
                                <td align="right" valign="middle" width="30">
                                    <asp:Button ID="btnCloseAll2" runat="server" Text="" />
                                </td>
                            </tr>
                        </table>
                    </div>
                    <div class="attention_topright">
                    </div>
                </div>
            </asp:Panel>
            <div class="attention_con">
                <asp:Panel ID="Panel3" runat="server">
                    <table border="1" runat="server" id="table2" cellpadding="5" cellspacing="0" bordercolor="#0e62a7"
                        style="width: 100%; text-align: center; border-collapse: collapse;">
                        <tr>
                            <td style="text-align: Center">
                                <asp:Label ID="lblTS" runat="server" Text=""></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td align="center" class="navi_link">
                                <asp:Button ID="btnBack_ts" runat="server" ToolTip="返回" Visible="true" />
                                <asp:Button ID="btnConfirm2" runat="server" ToolTip="确定" Visible="false" />
                                <asp:Button ID="btnCancel" runat="server" Text="Cancle" Visible="false" />
                            </td>
                        </tr>
                    </table>
                </asp:Panel>
            </div>
        </div>
    </asp:Panel>
    <asp:LinkButton ID="LinkButton1" runat="server"></asp:LinkButton>
    
    
    </form>
</body>
</html>
